package entity;

import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@Data
public class PmDeatil implements Serializable {
    /**
     * Summary
     */
    private Integer pmid;
    private String title;
    private String source;
    private String intro;
    //期刊id
    private String jid;

    /**
     * Abstract
     */
    private String ptype;
    private String jour;
    private String jourdetail;
    private String vip;
    private String year;
    private List<Author> author;
    private String authorls; //检索出来结果进行字符获取
    private List<Affiliation> affs;
    private String pmcid;
    private String doi;
    private String abstr;
    private String copyright;
    private String keyword;
    private String statement;
    private List<AssociatedData> pts;
    private List<AssociatedData> meshs;
    private List<AssociatedData> subs;
    private List<AssociatedData> grants;
    private List<AssociatedData> assData;
    private List<FullText> fulltext;
    private List<Figures> figures;
    private List<Similar_Cited> updateOf;
    private List<Similar_Cited> similar;
    private List<Similar_Cited> cited;
    private List<References> refs;
    private Map<String, List<LinkOut>> linkout;
    private List<Items> items;

    //能否申请全文 0可以 1不可以
    private Integer caseFlag = 0;

    /**
     * 后期添加
     */

    //TODO GCR 为了配合聚类检索使用pubmed地址 返回tbl数据
    private String tbl;

    @Data
    public static class TimeLine implements Serializable {
        private Integer year;
        private Integer count;
    }

    @Data
    public static class AssociatedData implements Serializable {
        private String title;
        //1:一种跳转方式  2：两种跳转方式
        private Integer type;
        private String href;
        private List<Items> hrefs;
    }

    @Data
    public static class Items implements Serializable {
        private String name;
        private String href;

        public Items() {
            super();
        }

        public Items(String name, String href) {
            super();
            this.href = href;
            this.name = name;
        }
    }

    @Data
    public static class FullText implements Serializable {
        private String href;
        private String img;
        private String name;
    }

    @Data
    public static class Author implements Serializable {
        private String nameiso;
        private String name;
        private List<Integer> num;
    }

    @Data
    public static class AuthorExtend implements Serializable {
        private String LastName = "";
        private String ForeName = "";
        private String Initials = "";
        private String IdentifierSource = "";
        //新的种类 不是作者 好像是团体还是什么
        private String collectiveName = "";
        //新种类 存储起来
        private String Suffix = "";
        private List<String> Affiliation;
    }

    @Data
    public static class Affiliation implements Serializable {
        private Integer num;
        private String name;
    }

    @Data
    public static class Figures implements Serializable {
        private String gif;
        private String jpg;
        private String href;
        private String title;
        private String contents;
    }

    @Data
    public static class Similar_Cited implements Serializable {
        private Integer pmid;
        private String title;
        private String source;
        private String intro;
    }

    @Data
    public static class References implements Serializable {
        private String listTitle;
        private List<RefList> list;
    }

    @Data
    public static class RefList implements Serializable {
        private String title;
        private List<LinkOut> href;
    }

    @Data
    public static class LinkOut implements Serializable {
        private String title;
        private String url;
    }

}


